import styles from './index.css';

import React, { useState, useEffect} from 'react';

import { Layout, Icon, Form, Button, Card,Input,message,Switch,Select,Empty} from 'antd'
import action from '@/pageCore/api'; 
import svg from '@/pageCore/svg'

import error from '@/assets/error-empty.png'
import emoji from '@/assets/emoji.png'
 
const {Option } = Select

const cur = 1;
 

export default function() {


  const [showCard, setShowCard] = useState(false);

  const [month, setMonth] = useState("");

  // action("/post",{ method:'post',data:{ 1:1 } })

  // action("/post",{ method:'post',}).then(function(response) { console.log(response); }) .catch(function(error) { console.log(error); });
    function changePassword(oldPassword,password){
     
      if(oldPassword.trim()==="" )return   message.error("Pleass enter oldPassword");
      if(password.trim()==="" )return   message.error("Pleass enter password");
      action("/api/post").then(function(response) { 
        console.log(response); 
        message.success("change password success")
        }) .catch(function(error) {
          message.success("change password error")
           console.log(error); 
        });  

    }
   
   const check = (str)=>{
      var cur = "January,February,March,April,May,June,July,August,September,October,November,December".split(",").indexOf(str)
      var today = new Date().getMonth();
      return cur < today;
    }
     

    const chooseMonth = (str)=>{
      if( check(str)) return {  }
      setMonth(str)
      setShowCard(false)
    }

    const renderMonth = (str)=>{
      return <div  className="search-result" onClick={()=>{chooseMonth(str) } } >
         {str} 
      </div>
    }
    // Oops... No Result  Try another keyword

  
  return (
    <div  style={{ width: 1000,padding: 100}}>    

      <Select  className="my-select" style={{ width: 100, }}   placeholder="请选择调度间隔" dropdownClassName="dropdown-style">
        <Option value="0">周一</Option>
        <Option value="1">周二</Option> 
    </Select> 

    <Select  className="cc-select"  placeholder="请选择调度间隔" dropdownClassName="dropdown-style">
      <Option value="0">周一</Option>
      <Option value="1">周二</Option> 
  </Select> 

      <Empty image={error} imageStyle={{ height: 160, }}
        description={
          <div>
              <div style={{ fontSize: 24, color: "#42526E",fontWeight:"bold"}}> Oops... No result </div>
              <div style={{ fontSize: 16, color: "#42526E",marginTop:10 }}> Try another keyword </div> 
          </div>
        }
      > 
      </Empty>

      <Empty image={emoji} imageStyle={{ height: 160, }}
        description={
          <div style={{ fontSize: 16, color: "#42526E",marginTop:10 }}>  Great! You already submitted all data required ! </div> 
        }
      >  
      </Empty>

      <Empty image={ <Icon type="smile" style={{ fontSize:100,color:"#42526E",fontWeight:400 }} /> } imageStyle = { { height:150 }} description = { null } >
      <span style={ { color:"#42526E" }}> Great! You already submitted all data required !</span>
      </Empty>
    </div>
  );
}
